In today's computer technology, computer monitors may have varying display sizes. For example, a computer monitor may offer a screen size of 640.times.480 pixels, 800.times.600 pixels, 960.times.720, 1024.times.768 pixels, 1,600.times.1,200 pixels, etc. Typically, graphics data is generated for a particular screen size. For example, many computer applications generate graphics data based on a display size of 640.times.480 pixels. If the graphics data is displayed on a 640.times.480 display, no scaling is required. If, however, the graphics data is displayed on a display that is not 640.times.480, the graphics data needs to be scaled (e.g., made smaller to fit a smaller screen, made bigger to fit a bigger screen) before it can be displayed. Scaling may also be required when the graphics data is not to be displayed in the entire display area, but is to be displayed in a window. As such, scaling is used quite readily by a computer's video graphics processor.
The video graphics processor may achieve the scaling by pixel replication or by expansion blending. If the video graphics process uses pixel replication, it repeats pixel to fill in addition pixel locations that result from upscaling (i.e., making the image bigger to fit on a bigger screen). For example, if the graphics data is for a 640.times.480 display and is to be scaled to fit on a 800.times.600 display, 160 pixels in the horizontal direction (800-640) need to be filled for each line. In addition, 120 lines (600-480) must be filled. As such, the additional pixels and lines are filled based on a pattern established by the upscaling ratio. In this example, the upscaling ratio is 4:3, thus the upscaling fill pattern will be (P.sub.n, P.sub.n+1, P.sub.n+2, P.sub.n+2, P.sub.n+3, P.sub.n+4, P.sub.n+5, P.sub.n+5, P.sub.n+6, . . . ). While pixel replication is a convenient technique for upscaling graphics data, it distorts the true shape of the images being upscaled, which can readily be deduced by looking at the fill pattern.
If the video graphics processor utilizes expansion blending, it blends pixel information of the original graphics data to fill in the additional pixel locations. The expansive blending may be done in a horizontal direction such that pixel information contained for pixels locations on the same line, are blended. For example, if the graphics data is for a 640.times.480 display and is to be scaled to fit on a 800.times.600 display, 160 pixels in the horizontal direction need to be filled for each line based on a blending of surrounding pixel information, as well as 120 lines need to be filled. The filling is done based on a pattern established by the upscaling ratio and a predetermined number of surrounding pixels are used to achieve the blending. In this example, the upscaling ratio is 4:3 and the number of pixels to blend is two, which produces an upscaling fill pattern of (P.sub.n, P.sub.n+1, P.sub.n+2, P.sub.fill2,3, P.sub.n+3, P.sub.n+4, P.sub.n+5, P.sub.fill5,6, P.sub.n+6, . . . ), where P.sub.fill2,3 is based on blending of P.sub.n+2 and P.sub.n+3, and P.sub.fill5,6 is based on a blending of P.sub.n+5 and P.sub.n+6. The expansion technique overcomes the image distortion of the pixel replication process, but it does so at the cost of increased memory requirements. For example, to upscale a 640 line to 800 pixels/line, the expansion blending technique requires at least two complete line buffers having sufficient memory to store 640 pixels worth of data.
Therefore, a need exists for a graphics scaling method and apparatus that reduces memory requirements and minimizes graphics distortion.